350 HOME : HTAB 9: INVERSE : PRINT " SELECTION SCREEN MAKER ": NORMAL
360 PRINT : PRINT "THIS PROGRAM WILL CREATE A TEXT FILE CONTAINING A 'SELECTION MENU' ROUTINE WHICH CAN BE 'EXEC'D INTO YOUR APPLESOFTPROGRAM.": PRINT
380 PRINT "YOU MAY CHOOSE TO HAVE A HEADER AT THE TOP OF YOUR SELECTION SCREEN OR NOT. SELECTIONS WILL BE MADE BY USE OF THE LEFT AND RIGHT ARROW KEYS, AS EXPLAINED"
390 PRINT "AT THE BOTTOM OF YOUR SELECTION SCREEN.": PRINT
400 PRINT "YOU WILL BE ASKED FOR 'SELECTION ITEMS' (SUCH AS PROGRAM NAMES, OR NAMES OF CHOICES IN YOUR PROGRAM) ... AND FOR"
410 PRINT "'ACTION' COMMANDS FOR EACH ITEM (EXACTLYAS YOU WOULD ENTER THEM INTO PROGRAM LINES .. ";: INVERSE : PRINT "GOTO 550";: NORMAL : PRINT ", OR ";: INVERSE : PRINT "PRINT ";Q$;" RUN ABC";Q$;: NORMAL : PRINT ","
420 PRINT "INCLUDING CONTROL CHARACTERS, SUCH AS CONTROL-D FOR DOS COMMANDS, ETC."
450 GOSUB 100: HOME : GOTO 1000
500 REM
999 REM ** PROMPTS FOR LINE NO. ** VALUES AND HEADER ** LINES...
1000 VTAB 9: CALL -958: PRINT "A ";: INVERSE : PRINT "RETURN";: NORMAL : PRINT " ACCEPTS THE DEFAULT VALUE..."
1010 VTAB 11: PRINT "STARTING LINE # FOR YOUR ROUTINE: 9000";: POKE 36, PEEK(36) -4
2050 PRINT "ENTER THE EXACT COMMAND(S) THAT SHOULD BE EXECUTED IF THIS SELECTION IS MADE.. (E.G., ";: INVERSE : PRINT "GOTO 550";: NORMAL : PRINT " OR ";: INVERSE : PRINT "PRINT ";Q$;" BRUN XYZ";Q$;: NORMAL : PRINT " ..."
2060 PRINT "DON'T FORGET THE CONTROL-D FOR DOS!)": PRINT
2070 GOSUB 110:SA$(S) = S$: REM GET THE EXACT LINE, VERBATIM
2080 S = S +1: GOTO 2020
2090 REM
3000 REM 'CENTER' THE DISPLAYS:
3010 FOR X = 1 TO S: IF LEN(SI$(X)) >HM THEN HM = LEN(SI$(X)): NEXT
3020 HT = INT(20 -HM/2) +(HM = 0)
4000 REM ::::DISPLAY::::
4010 TEXT : HOME : IF HL THEN INVERSE : FOR X = 0 TO HL -1: PRINT HL$(X);: NEXT : NORMAL : PRINT
4020 CS = 1: REM CURRENT SELECTION
4030 FOR X = 1 TO S: IF X = CS THEN INVERSE
4040 VTAB HL +2 +X +X *(S <10)
4050 HTAB HT: PRINT SI$(X): NORMAL
4060 NEXT
4070 VTAB 23: INVERSE : PRINT "<-";: NORMAL : PRINT " ";: INVERSE : PRINT "->";: NORMAL : PRINT " TO SELECT .... ";: INVERSE : PRINT "RETURN";: NORMAL : PRINT " TO EXECUTE."
4080 VTAB 24: HTAB 3: FLASH : PRINT "C";: NORMAL : PRINT " TO CHANGE ... ";: FLASH : PRINT "ESC";: NORMAL : PRINT " TO ACCEPT.";
4090 POKE -16368,0
4100 K = PEEK( -16384): IF K <128 THEN 4100
4110 POKE -16368,0:K = K -128: IF K < >8 AND K < >21 AND K < >13 AND K < >27 AND K < >67 THEN 4100: REM THE ONLY ACCEPTABLE KEYS
4120 VTAB 21: HTAB 1: CALL -868
4130 OS = CS
4140 IF K = 8 THEN CS = CS -1:CS = CS *(CS >0) +S *(CS = 0): GOSUB 150: GOTO 4100: REM LEFT-ARROW
4150 IF K = 21 THEN CS = CS +1:CS = CS *(CS < = S) +(CS = S +1): GOSUB 150: GOTO 4100: REM RIGHT-ARROW
4160 IF K = 13 THEN VTAB 21: PRINT " ";SA$(CS): GOTO 4100: REM C.R.
4170 IF K = 27 THEN 6000: REM 'ESC' - WRITE THE FILE
4180 REM K MUST BE 67 ('C')...
4190 HOME : VTAB 22: INVERSE : PRINT "CR";: NORMAL : PRINT " ACCEPTS LINE .. OR ENTER NEW LINE..."
6470 VTAB 13: PRINT "YOUR SELECTION SCREEN PROGRAM SEGMENT IS CONTAINED IN THE FILE ";Q$;"SELECT.SEG";Q$;"."
6480 VTAB 16: PRINT "YOU CAN 'EXEC SELECT.SEG' INTO YOUR TARGET PROGRAM. IT WILL OCCUPY LINE NUMBERS ";: INVERSE : PRINT LS;: NORMAL : PRINT " TO ";: INVERSE : PRINT LN;: NORMAL : PRINT "."